﻿(function ($) {
    //, required, span, label
    $.fn.Watermark = function (objT, title, objvalue) {
        objT.val(title);
        objT.focus(
            function () {
                if (this.value == title || this.value == objvalue) {
                    this.style.color = "#7e7e7e";
                    this.value = objvalue;
                    //move();
                }
            });
        $(objT.blur(
            function () { //&& required
                if (this.value == "") {
                    this.style.color = "#7e7e7e";
                    this.value = objvalue;
                }
                if (this.value != "" && this.value != objvalue) {
                    this.style.color = "#000";
                }
            }));
        objT.keydown(function () {
            if (this.value == objvalue) {
                this.value = "";
            }
            //this.value = "";
        });

    };

})(jQuery);